From 9b3f2165a16505870d86b51aaa467fcd3643b12f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 5 Jun 2016 23:04:20 -0700 Subject: [PATCH] Avoid exceptions for empty titles in addResultToCache() for sanity Bug: T137083 Change-Id: Ie8aabba30bc0d7a6910a58104ff08ea036ba962d --- includes/cache/LinkBatch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index f48e0a5167..ec37dd61c3 100644 --- a/includes/cache/LinkBatch.php +++ b/includes/cache/LinkBatch.php @@ -73,8 +73,8 @@ class LinkBatch { * @param string $dbkey */ public function add( $ns, $dbkey ) { - if ( $ns < 0 ) { - return; + if ( $ns < 0 || $dbkey === '' ) { + return; // T137083 } if ( !array_key_exists( $ns, $this->data ) ) { $this->data[$ns] = []; -- 2.20.1